#ifndef GLOBALS_H
#define GLOBALS_H

#include <signal.h>
#include <string.h>
#include <stdio.h>
#include <stdarg.h>
#include <time.h>
#include <stdlib.h>
#include <windows.h>
#include <vector>
#include <d3d9.h>
#include <d3dx9.h>
#include <dinput.h>
#include "CRect.h"
#include "CTimer.h"
#include "CGraphics.h"

//view mode(used in contructor of game class)

#define GAME_SCREEN_RESOLUTION_640_480_24   1000
#define GAME_SCREEN_RESOLUTION_800_600_24   1001
#define GAME_SCREEN_RESOLUTION_1024_768_24  1002

#define GL_KEY_BUFFER_SIZE	1024

//#define FRAME_RATE 40

#define CPointMake(x, y) CPoint((float)(x), (float)(y))

enum SpriteEffect
{
	None = 0,
	Horizontally = 1,
	Vertical = 2
};

enum EDirection
{
	Top = 0,
	Bottom,
	Left,
	Right,
	NONE
};

extern CTimer *GL_timer;
extern CGraphic *GL_graphic;

extern int GL_scrWidth;
extern int GL_scrHeight;
extern int GL_mode;
extern bool GL_windowMode;
extern int GL_frameRate; 
extern	TCHAR	GL_AppName[];
extern float	GL_DeltaTime;
extern int GL_FPS;
//
//GLOBAL FUNCTION
//

//write string to a log file
void GLLogger(char* format, ...);

//show a message box
void GLMessage(char* text);

//show string to the caption of window
void GLTitle(char* text);


#endif GLOBALS_H